//
//  HWNavigationController.h
//  OCDome
//
//  Created by 李含文 on 2020/10/14.
//  Copyright © 2020 李含文. All rights reserved.
//

#import <UIKit/UIKit.h>

@class HWNavigationController;

NS_ASSUME_NONNULL_BEGIN

@protocol HWBackButtonHandlerProtocol <NSObject>
@optional
/// 在UIViewController派生类中重写这个方法来处理“后退”按钮点击及边缘返回手势
- (BOOL)hw_navigationShouldPopOnBackButton;

@end

@interface UIViewController (HWNavigationExtension)<HWBackButtonHandlerProtocol, UIGestureRecognizerDelegate>

/// 添加自定义返回按钮
- (void)hw_customBackButton;
/// 设置导航栏颜色
- (void)hw_switchNavColor:(UIColor *)color;

/// 移除导航栏底部黑线
- (void)hw_removeNavBarBottomBlackLine;
/// 记录控制器真实的导航控制器
@property (nonatomic, weak) HWNavigationController *hw_navigationController;
/// 返回到指定控制器
- (void)hw_popToViewControllerWithName:(NSString *)name;
@end

@interface HWWrapViewController : UIViewController

/// 自身的导航控制器
@property (nonatomic, strong, readonly) UIViewController *rootViewController;

@end

@interface HWNavigationController : UINavigationController

@property (nonatomic, copy, readonly) NSArray *hw_viewControllers;

@end



NS_ASSUME_NONNULL_END
